<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('price_settings', function (Blueprint $table) {
            $table->id();

            $table->unsignedInteger('service_category_id')->comment('服务项目类型id');
            $table->unsignedInteger('max_quantity')->comment('最大咨询量');
            $table->decimal('price',10,1)->comment('对应价格');
            $table->decimal('unit_price',10,1)->comment('均价');

            $table->timestamps();
        });

        \DB::statement("ALTER TABLE `price_settings` comment '价格设置表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('price_settings');
    }
};
